package cn.com.dycc.sys_manage.usersysmanagement.entity;

import java.io.Serializable;
import java.util.List;

import cn.com.dycc.sys_manage.deptsysmanagement.entity.DeptInfo;
import cn.com.dycc.sys_manage.rolesysmanagement.entity.RoleInfo;

public class UserIndexResult implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3062620602508987069L;
	
	private String id;                 //用户ID
	private String username;			//用户姓名
	private String nickname;			//用户昵称
	
	private DeptInfo deptNo;					//接收子表部门信息
	private DeptInfo topDeptNo;				//接收子表上级部门信息
	private List<RoleInfo> listRole;		//接收用户权限
	
	public UserIndexResult(){}

	

	public UserIndexResult(String id, String username, String nickname, DeptInfo deptNo, DeptInfo topDeptNo,
			List<RoleInfo> listRole) {
		super();
		this.id = id;
		this.username = username;
		this.nickname = nickname;
		this.deptNo = deptNo;
		this.topDeptNo = topDeptNo;
		this.listRole = listRole;
	}



	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public DeptInfo getDeptNo() {
		return deptNo;
	}

	public void setDeptNo(DeptInfo deptNo) {
		this.deptNo = deptNo;
	}

	public DeptInfo getTopDeptNo() {
		return topDeptNo;
	}

	public void setTopDeptNo(DeptInfo topDeptNo) {
		this.topDeptNo = topDeptNo;
	}

	public List<RoleInfo> getListRole() {
		return listRole;
	}

	public void setListRole(List<RoleInfo> listRole) {
		this.listRole = listRole;
	}
	
	

	public String getNickname() {
		return nickname;
	}



	public void setNickname(String nickname) {
		this.nickname = nickname;
	}



	@Override
	public String toString() {
		return "UserIndexResult [id=" + id + ", username=" + username + ", nickname=" + nickname + ", deptNo=" + deptNo
				+ ", topDeptNo=" + topDeptNo + ", listRole=" + listRole + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserIndexResult other = (UserIndexResult) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
	
	

}
